<?php
/**
 * Created by PhpStorm.
 * User: 董伟
 * Date: 2019/10/31
 * Time: 11:45
 */

namespace app\manage\controller;
use app\common\model\ShopType as ShopTypeModel;
use app\common\model\GoodMods;


class ShopType extends Base
{
    /**
     * 添加/编辑页面附加数据
     * @param array $info 要编辑的信息数据
     */
    public function addAttach($info)
    {
        $categories = ShopTypeModel::field('id,parent_id,name,is_last')->order('id ASC')->select();
        $categories = recursion_one_array($categories);
        $goodMods   = GoodMods::field('id,name')->where('is_show', 1)->order('list_order DESC,id DESC')->select();
        $this->assign('categories', $categories);
        $this->assign('goodMods', $goodMods);
    }

}